<?php

class Sgit_Validate_Ram extends Zend_Validate_Abstract
{
    const RAM = 'ram';

    protected $_messageTemplates = array(self::RAM => "'%value%' solo puede ser +- 1,2,4,8");


    public function isValid($value)
    {
        $this->_setValue($value);

        if (!in_array(abs($value), array(1, 2, 4, 8)))
        {
            $this->_error(self::RAM);
            return false;
        }


        return true;
    }
}
